
import { DmgTypeKey, XAbilityExclusive } from "../../types/L_Type";
import UnitX from "../../entity/UnitX";
import XBuff from "../../event/eventdef/XBuff";
import XAbilityBase from "./XAbilityBase";

/**闪避回蓝实现类  */
export default class FleeAtkUp extends XAbilityBase{




    public execXAbility(aux: UnitX, bux: UnitX, weight:number,dmgTypeKey?:DmgTypeKey,exclusiveAttr?: XAbilityExclusive | undefined): void {
        console.log(bux.name,"【闪避】短暂加攻击,值:",weight)

        new XBuff('BUFF','SECONDS',(exclusiveAttr?.lastedTime || 1),()=>{
            console.log("获取攻击buff 增加攻击力",weight)
            bux.incrUnitAttrs({attrs:{atk:weight}})
        },
        ()=>{
            console.log("失去攻击buff 减少攻击力",weight)
            bux.redcUnitAttrs({attrs:{atk:weight}})
        }
        ).beAddedAndExec()
    }
 
 
 
 
 


  
}  